import request from '@/utils/request'

export function loginByUsername(username, password, code) {
  return request({
    url: '/sys/login',
    method: 'get',
    params: {
      userName: username,
      password: password
    }
  })
}

export function logout() {
  return request({
    url: '/auth/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/auth/info',
    method: 'get',
    params: {
      token
    }
  })
}


export function changePassword(data) {
  return request({
    url: '/sys/changePassword',
    method: 'post',
    data
  })
}
